<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
 <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
 <script>
  $(function() {
    $( ".datepicker" ).datepicker();
  });
</script>
 
<?php echo Form::open('admin/promotions/createforitem/'.$item_id);?>

<?php echo Form::label('description', 'Description');?>
<?php echo Form::textarea('description',Arr::get($values, 'description'));?>
<?php if(Arr::get($errors, 'description')):?>
<?php echo Form::label('description', Arr::get($errors, 'description'), array('class' => 'error'));?>
<?php endif;?>

<?php echo Form::label('Discount Type');?>
<?php echo Form::select('discount_type', array('amount' => 'Dollar Amount', 'percent' => 'Percentage'), Arr::get($values, 'discount_type'))?>
<?php echo Form::input('discount', Arr::get($values, 'discount')); ?>
<?php if(Arr::get($errors, 'discount_type')):?>
<?php echo Form::label('discount_type', Arr::get($errors, 'discount_type'), array('class' => 'error'));?>
<?php endif;?>
<?php if(Arr::get($errors, 'discount')):?>
<?php echo Form::label('discount', Arr::get($errors, 'discount'), array('class' => 'error'));?>
<?php endif;?>

<?php echo Form::label('Promotion Start Date');?>
<?php echo Form::input('_external[start_date]', Arr::path($values, '_external.start_date'), array('class' => 'datepicker'))?>
<?php if(Arr::path($errors, '_external.start_date')):?>
<?php echo Form::label('start_date', Arr::path($errors, '_external.start_date'), array('class' => 'error'));?>
<?php endif;?>

<?php echo Form::label('Promotion End Date');?>
<?php echo Form::input('_external[end_date]', Arr::path($values, '_external.end_date'), array('class' => 'datepicker'))?>
<?php if(Arr::path($errors, '_external.end_date')):?>
<?php echo Form::label('end_date', Arr::path($errors, '_external.end_date'), array('class' => 'error'));?>
<?php endif;?>

<?php echo Form::submit('submit', 'Create Promotion');?>

<?php echo Form::close();?>